<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
		<link href="css/bp-style.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="assets/css/style.css">
		<title>地名纠错</title>
	</head>
	<body>
		<div class="wrap" style="margin-bottom: 60px;">
			<div class="bj-toptit">
				<span>地名纠错</span>
			</div>
			<div class="bj-map">
				<!--百度地图容器-->
    			<div style="height:250px;border:#ccc solid 1px;font-size:12px" id="dituContent"></div>
			</div>
			<div class="bj-table">
			<span class="bj-title"><b>地名纠错</b></span> 
				<table width="100%" class="bj-table-one">
					<tr>
						<td width="65px">地点：</td>
						<td colspan="2">
							<label>
								西安钟楼
							</label> 
						</td>
					</tr>
					<tr>
						<td>姓名：</td>
						<td colspan="2">
							<label>
								<input class="inputtwo" placeholder="姓名"/>
							</label> 
						</td>
					</tr>
					<tr>
						<td>手机号：</td>
						<td colspan="2">
							<label>
								<input class="inputtwo" placeholder="手机号"/>
							</label> 
						</td>
					</tr>
					<tr>
						<td valign="top" width="80px">错误描述：</td>
						<td>
							<textarea class="textarea-style textarea-heigth" placeholder="请简要描述错误..."></textarea>
						</td>
					</tr>
				</table>
			
			</div>
			<div class="bj-table">
				<div class="btn-guanzhu">
					<a href="xian-index.html">一键纠错</a>
				</div>
			</div>
		</div>
		<div class="nav-bottom">
			<ul>
				<li><a href="mzgw.html">
				<span class="navbottom_icon01"></span>
				 <span>民政官网</span>
				</a></li>
				<li><a href="mzfw.html">
				 <span>民政服务</span>
				</a></li>
				<li><a href="jiucuo.html">
				<span class="navbottom_icon02"></span>
				 <span>地名纠错</span>
				</a></li>
			</ul>
		</div>


  <!------------------------------------------------------>
	<script src="js/jquery-2.1.1.min.js"></script>
  <script>
		$(function(){
		
		var win=$(window); //得到窗口对象
		
		var sc=$(document);//得到document文档对象。
		
		win.scroll(function(){
		
		if(sc.scrollTop()>=780){
		
		nav.addClass("float-map-show");
		}else{
		nav.removeClass("float-map-show")
		}
		
		});
		});
		</script>
	<script src="assets/js/slider.js"></script> 
	<script type="text/javascript">
	(function() {
		Slider.init({
			target: $('.slider'),
			time: 4000
		});
	})();
</script>
<!----------选中---------->
<script>
	$(function(){
		$(".bj-table-two").each(function() {
				var i = $(this);
				var p = i.find("span");
				p.click(function() {
					if (!!$(this).hasClass("click")) {
						$(this).removeClass("click");
						//i.removeAttr("data-attrval");
					} else {
						$(this).addClass("click");
						//i.attr("data-attrval",$(this).attr("data-aid"))
					}
				})
			})
		
	
	})


</script>
<!--引用百度地图API-->
  <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=79ztjfis0XStrHNpEpezr2za3iQNbW9f"></script>
  <script type="text/javascript">
    //创建和初始化地图函数：
    function initMap(){
        createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件
        addMarker();//向地图中添加marker
        addPolyline();//向地图中添加线
    }
    
    //创建地图函数：
    function createMap(){
        var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
        var point = new BMap.Point(108.953333,34.266799);//定义一个中心点坐标
        map.centerAndZoom(point,17);//设定地图的中心点和坐标并将地图显示在地图容器中
        window.map = map;//将map变量存储在全局
    }
    
    //地图事件设置函数：
    function setMapEvent(){
        map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
        map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
        map.enableKeyboard();//启用键盘上下左右键移动地图
    }
    
    //地图控件添加函数：
    function addMapControl(){
        //向地图中添加缩放控件
	var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
	map.addControl(ctrl_nav);
        //向地图中添加缩略图控件
	var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:0});
	map.addControl(ctrl_ove);
        //向地图中添加比例尺控件
	var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
	map.addControl(ctrl_sca);
    }
    
    //标注点数组
    var markerArr = [{title:"西安钟楼",content:"我的备注",point:"108.953378|34.265815",isOpen:0,icon:{w:23,h:25,l:46,t:21,x:9,lb:12}}
		 ];
    //创建marker
    function addMarker(){
        for(var i=0;i<markerArr.length;i++){
            var json = markerArr[i];
            var p0 = json.point.split("|")[0];
            var p1 = json.point.split("|")[1];
            var point = new BMap.Point(p0,p1);
			var iconImg = createIcon(json.icon);
            var marker = new BMap.Marker(point,{icon:iconImg});
			var iw = createInfoWindow(i);
			var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)});
			marker.setLabel(label);
            map.addOverlay(marker);
            label.setStyle({
                        borderColor:"#808080",
                        color:"#333",
                        cursor:"pointer"
            });
			
			(function(){
				var index = i;
				var _iw = createInfoWindow(i);
				var _marker = marker;
				_marker.addEventListener("click",function(){
				    this.openInfoWindow(_iw);
			    });
			    _iw.addEventListener("open",function(){
				    _marker.getLabel().hide();
			    })
			    _iw.addEventListener("close",function(){
				    _marker.getLabel().show();
			    })
				label.addEventListener("click",function(){
				    _marker.openInfoWindow(_iw);
			    })
				if(!!json.isOpen){
					label.hide();
					_marker.openInfoWindow(_iw);
				}
			})()
        }
    }
    //创建InfoWindow
    function createInfoWindow(i){
        var json = markerArr[i];
        var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>");
        return iw;
    }
    //创建一个Icon
    function createIcon(json){
        var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
        return icon;
    }
//标注线数组
    var plPoints = [{style:"solid",weight:4,color:"#f00",opacity:0.6,points:["108.946892|34.265636","108.958265|34.265815","108.958408|34.265845"]}
		 ];
    //向地图中添加线函数
    function addPolyline(){
		for(var i=0;i<plPoints.length;i++){
			var json = plPoints[i];
			var points = [];
			for(var j=0;j<json.points.length;j++){
				var p1 = json.points[j].split("|")[0];
				var p2 = json.points[j].split("|")[1];
				points.push(new BMap.Point(p1,p2));
			}
			var line = new BMap.Polyline(points,{strokeStyle:json.style,strokeWeight:json.weight,strokeColor:json.color,strokeOpacity:json.opacity});
			map.addOverlay(line);
		}
	}
    
    initMap();//创建和初始化地图
</script>
  <!------------------------------------------------------>
	<script src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="dist/swipeslider.min.js"></script>
	<script type="text/javascript">
		$(window).load(function() {
		      $('#full_feature').swipeslider();
		      $('#content_slider').swipeslider({
		        transitionDuration: 600,
		        autoPlayTimeout: 10000,
		        sliderHeight: '300px'
		      });
		      $('#responsiveness').swipeslider();
		      $('#customizability').swipeslider({
		        transitionDuration: 1500, 
		        autoPlayTimeout: 4000, 
		        timingFunction: 'cubic-bezier(0.38, 0.96, 0.7, 0.07)',
		        sliderHeight: '30%'});
		    });
	</script>
	</body>
</html>
